package com.zjj.algorithm.learning.leetcode.str;

import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

/**
 * 17. 电话号码的字母组合 中档题
 * 给定一个仅包含数字 2-9 的字符串，返回所有它能表示的字母组合。答案可以按 任意顺序 返回。
 * <p>
 * 给出数字到字母的映射如下（与电话按键相同）。注意 1 不对应任何字母。
 * <p>
 * 示例 1：
 * <p>
 * 输入：digits = "23"
 * 输出：["ad","ae","af","bd","be","bf","cd","ce","cf"]
 * 示例 2：
 * <p>
 * 输入：digits = ""
 * 输出：[]
 * 示例 3：
 * <p>
 * 输入：digits = "2"
 * 输出：["a","b","c"]
 * <p>
 * <p>
 * 提示：
 * <p>
 * 0 <= digits.length <= 4
 * digits[i] 是范围 ['2', '9'] 的一个数字。
 *
 * @author zjj_admin
 * @date 2022/12/20 9:48
 */
public class LetterCombinationsOfPhoneNumber {


    public static void main(String[] args) {

    }

    private static final String[] s2 = new String[]{"a", "b", "c"};
    private static final String[] s3 = new String[]{"d", "e", "f"};
    private static final String[] s4 = new String[]{"g", "h", "i"};
    private static final String[] s5 = new String[]{"j", "k", "l"};
    private static final String[] s6 = new String[]{"m", "n", "o"};
    private static final String[] s7 = new String[]{"p", "q", "r", "s"};
    private static final String[] s8 = new String[]{"t", "u", "v"};
    private static final String[] s9 = new String[]{"w", "x", "y", "z"};

    /**
     * @param digits
     * @return
     */
    public static List<String> letterCombinations(String digits) {
        List<String> res = new ArrayList<>();
        if (digits.length() == 0) {
            return res;
        }
        String[] strs = new String[digits.length()];
        for (int i = 0; i < digits.length(); i++) {
            strs[i] = digits.substring(i, i + 1);
        }

        return null;
    }
}
